import os, sys

sys.path.append('/home/brenden/work/myproject/mysite/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

from brispone.models import Net
from conn import MGDB

m = MGDB('emc', 'net')
cur = m.list({})
n = None

print len(Net.objects.all())
for n in Net.objects.all():
    n.delete()

print len(Net.objects.all())

for c in cur:
    c.pop('_id')
#    print c
    n = Net(**c)
    n.save()


print Net.objects.all()
